Terraform 入門
#tech #terraform
Terraform を使って GCP 上のインスタンスを作成する
Cloud SQL with Postgres
Google Cloud SQL for PostgreSQL インスタンス作成 – Terraform – – IT curry blog
基本的にこのページの真似をする
秘匿情報はとりあえず terraform.tfstate に入れて gitignore
Service account が必要
role は Cloud SQL Admin
VPC
vpc 構築する
VPC ネットワークの使用  |  VPC  |  Google Cloud
公式チュートリアル
memo
TerraformによるGCP環境の管理
GCPインフラ構築自動化の道 part1 ~Terraform 導入編~ | apps-gcp.com
GCP で terraform 使う
Terraform で GCP のリソースを管理する - kawabatas技術ブログ
構成の参考に
Trouble shooting
code:text
* google_compute_instance.ubuntu-xenial: The user does not have access to service account '298693621029-compute@developer.gserviceaccount.com'. User: 'terraform@system-automation-184009.iam.gserviceaccount.com'. Ask a project owner to grant you the iam.serviceAccountActor role on the service account
default のサービスアカウントとのリンク
https://medium.com/@josephbleroy/using-terraform-with-google-cloud-platform-part-1-n-6b5e4074c059